package com.yuan.dao;

import com.yuan.utlis.DruidUtil;
import org.apache.commons.dbutils.QueryRunner;

import java.sql.Connection;
import java.sql.SQLException;

public class AccountDao {
    QueryRunner queryRunner = new QueryRunner(DruidUtil.getDataSource());
    public void UpdateAccount(Connection conn,String name, double money){
        try {
            String sql2="update account set money=money+? where name=?";
            queryRunner.update(conn,sql2,money,name);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
